package com.zc.cms.controller;


import com.zc.cms.entity.CrmBanner;
import com.zc.cms.service.CrmBannerService;
import com.zc.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author cong
 * @since 2022-11-30
 */
@RestController
@RequestMapping("/cms/bannerFront")
@CrossOrigin
public class BannerFrontController {

	@Autowired
	private CrmBannerService bannerService;

	@GetMapping("/getAllBanner")
	public R getAllBanner() {
		List<CrmBanner> bannerList = bannerService.getAllBanner();
		return R.ok().data("bannerList", bannerList);
	}

}

